﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using System.IO;

namespace Megaman
{
    class SceneTransition
    {
        public Texture2D Texture;
        public Vector2 Position;
        public Vector2 ScreenDim;
        public char Id;

        public SceneTransition(Texture2D Texture, Vector2 position, char Id)
        {
            this.Position = position;
            this.Texture = Texture;
            this.Id = Id;
        }

        public bool isIncluded(Vector2 CameraPos, Vector2 ScreenDim)
        {
            this.ScreenDim = ScreenDim;
            Vector2 Pos = Position * ScreenDim;
            if ((CameraPos.X + ScreenDim.X > Pos.X) && (CameraPos.X  < Pos.X + ScreenDim.X))
            {
        
                    return true;
                
            }
            return false;
        }

        public Rectangle getDrawPosition()
        {
           Rectangle resp =  new Rectangle((int)(Position.X * ScreenDim.X),(int)(Position.Y*ScreenDim.Y),Texture.Width, Texture.Height);
           return resp;
        }
    }
}
